package cn.gson.fengboot.model.pojos;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "qproductdetail_qmodeldetails", schema = "springboot", catalog = "")
@IdClass(QproductdetailQmodeldetailsPK.class)
public class QproductdetailQmodeldetails {
    private int prodetailId;
    private int modetId;

    @Id
    @Column(name = "prodetail_id")
    public int getProdetailId() {
        return prodetailId;
    }

    public void setProdetailId(int prodetailId) {
        this.prodetailId = prodetailId;
    }

    @Id
    @Column(name = "modet_id")

    public int getModetId() {
        return modetId;
    }

    public void setModetId(int modetId) {
        this.modetId = modetId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        QproductdetailQmodeldetails that = (QproductdetailQmodeldetails) o;
        return prodetailId == that.prodetailId &&
                modetId == that.modetId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(prodetailId, modetId);
    }
}
